package com.github.east196;

import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSON;
import cn.hutool.json.JSONUtil;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
        System.out.println( "Hello World!" );
        String result = HttpUtil.get("http://fanyi.youdao.com/translate?&doctype=json&type=AUTO&i="+"hello");
        JSON json = JSONUtil.parse(result);
        String tgt=JSONUtil.getByPath(json, "translateResult[0][0].tgt","");
        System.out.println(tgt);
    }
    

}
